Skip to content

Add temp-clone support to run fyai on remote Git repos#4

Merged
atrtde merged 8 commits intostagingfrom
codex/add-command-fyai-github-gitlab
Feb 9, 2026
Merged

Add temp-clone support to run fyai on remote Git repos#4
atrtde merged 8 commits intostagingfrom
codex/add-command-fyai-github-gitlab

Conversation

@Codex
Copy link
Copy Markdown
Contributor

@Codex Codex AI commented Feb 9, 2026

Enable running fyai against a GitHub/GitLab repository by cloning into a temporary workspace, processing there, and leaving no residue beyond the output.

  • CLI/Entry: New --repo (with optional --repo-branch) flags hook main flow to a remote-run path after normal config merge.
  • Execution: repository.rs clones with git --depth 1, swaps Config.directory to the temp clone, invokes existing processing, and relies on TempDir drop for cleanup.
  • Docs: README documents remote usage and new flags.
  • Tests: Added coverage for remote run behavior and temp cleanup via local git fixture.

Example:

fyai --repo https://github.com/owner/repo.git --repo-branch main -o output.txt
Original prompt

add a new command that allow to perform fyai but on a github/gitlab repo instead of current local directory. code should be modular and operation shouldn't leave trace on computer except the produced result. if needed, can use a tmp dir but should cleanup. if better alternatives exist, do it.

@Codex Codex AI changed the title [WIP] Add command to perform fyai on GitHub/GitLab repositories Add temp-clone support to run fyai on remote Git repos Feb 9, 2026
@Codex Codex AI requested a review from atrtde February 9, 2026 13:05
@atrtde atrtde marked this pull request as ready for review February 9, 2026 14:19
Copilot AI review requested due to automatic review settings February 9, 2026 14:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for running fyai against a remote Git repository by cloning it into a temporary workspace, running the existing processing pipeline on that clone, and relying on tempdir cleanup afterward.

Changes:

  • Introduces --repo and optional --repo-branch CLI flags and routes execution through a repository-clone path.
  • Adds src/repository.rs with git clone --depth 1 + tempdir-based cleanup, and overrides Config.directory to point at the clone.
  • Documents the new remote-run workflow in README and adds unit tests around clone/run behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/repository.rs Implements tempdir clone + runs existing pipeline on the cloned directory.
src/main.rs Hooks --repo flow into main execution after config merge.
src/cli.rs Adds --repo / --repo-branch flags to clap CLI.
README.md Documents new flags and remote usage example.
src/tests/repository_tests.rs Adds tests for running on a cloned repo and temp cleanup behavior.
src/tests/mod.rs Registers the new repository test module.
Cargo.toml Moves tempfile into runtime dependencies.
Comments suppressed due to low confidence (1)

Cargo.toml:28

  • [dev-dependencies] is now empty after moving tempfile to normal dependencies. Consider removing the empty section to keep Cargo.toml tidy.
[dev-dependencies]


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread src/tests/repository_tests.rs
Comment thread src/repository.rs Outdated
Comment thread src/tests/repository_tests.rs
Comment thread src/tests/repository_tests.rs
Comment thread src/repository.rs Outdated
Comment thread src/cli.rs Outdated
Comment thread src/cli.rs Outdated
@atrtde atrtde merged commit 301f2a2 into staging Feb 9, 2026
7 checks passed
@atrtde atrtde deleted the codex/add-command-fyai-github-gitlab branch February 9, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants